/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author dong
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '/@/api/model/baseModel';

const { adminPath } = useGlobSetting();

export interface JydqComparisonRule extends BasicModel<JydqComparisonRule> {
  name?: string; // 规则名称
  algorithm?: string; // 算法描述
}

export const jydqComparisonRuleList = (params?: JydqComparisonRule | any) =>
  defHttp.get<JydqComparisonRule>({ url: adminPath + '/jydq/comparisonRule/list', params });

export const jydqComparisonRuleListData = (params?: JydqComparisonRule | any) =>
  defHttp.post<Page<JydqComparisonRule>>({ url: adminPath + '/jydq/comparisonRule/listData', params });

export const jydqComparisonRuleForm = (params?: JydqComparisonRule | any) =>
  defHttp.get<JydqComparisonRule>({ url: adminPath + '/jydq/comparisonRule/form', params });

export const jydqComparisonRuleSave = (params?: any, data?: JydqComparisonRule | any) =>
  defHttp.postJson<JydqComparisonRule>({ url: adminPath + '/jydq/comparisonRule/save', params, data });

export const jydqComparisonRuleDelete = (params?: JydqComparisonRule | any) =>
  defHttp.get<JydqComparisonRule>({ url: adminPath + '/jydq/comparisonRule/delete', params });
